﻿using System.Drawing;

namespace SharpCmd.Controls.Viewers
{
    internal static class ViewerFontManager
    {
        private static object lockObject;
        private static Font monospaceFont;
        private static Font sansFont;

        static ViewerFontManager()
        {
            lockObject = new object();
        }

        public static Font MonospaceFont
        {
            get
            {
                lock (lockObject)
                {
                    if (monospaceFont == null)
                        //TODO read font settings from configuration
                        monospaceFont = new Font(FontFamily.GenericMonospace, 9, FontStyle.Bold);
                    return monospaceFont;
                }
            }
        }

        public static Font SansFont
        {
            get
            {
                lock (lockObject)
                {
                    if (sansFont == null)
                        //TODO read font settings from configuration
                        sansFont = new Font(FontFamily.GenericSansSerif, 9, FontStyle.Bold);
                    return sansFont;
                }
            }
        }
    }
}